package com.wyzz.hr.pojo.base;

import java.io.Serializable;
import java.util.Date;

import com.wyzz.hr.pojo.Department;
import com.wyzz.hr.pojo.Depthist;

public abstract class BaseDepthist implements Serializable {

	public BaseDepthist() {
		hashCode = 0x80000000;
		initialize();
	}

	public BaseDepthist(String id) {
		hashCode = 0x80000000;
		setId(id);
		initialize();
	}

	public BaseDepthist(String id, Department dhiDeptNo,
			Department dhiDeptSupId, String dhiDeptName, Integer dhiDeptStatus,
			Date dhiValidFrom) {
		hashCode = 0x80000000;
		setId(id);
		setDhiDeptNo(dhiDeptNo);
		setDhiDeptSupId(dhiDeptSupId);
		setDhiDeptName(dhiDeptName);
		setDhiDeptStatus(dhiDeptStatus);
		setDhiValidFrom(dhiValidFrom);
		initialize();
	}

	protected void initialize() {
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
		hashCode = 0x80000000;
	}

	public String getDhiDeptName() {
		return dhiDeptName;
	}

	public void setDhiDeptName(String dhiDeptName) {
		this.dhiDeptName = dhiDeptName;
	}

	public Integer getDhiDeptStatus() {
		return dhiDeptStatus;
	}

	public void setDhiDeptStatus(Integer dhiDeptStatus) {
		this.dhiDeptStatus = dhiDeptStatus;
	}

	public Date getDhiValidFrom() {
		return dhiValidFrom;
	}

	public void setDhiValidFrom(Date dhiValidFrom) {
		this.dhiValidFrom = dhiValidFrom;
	}

	public Date getDhiValidTo() {
		return dhiValidTo;
	}

	public void setDhiValidTo(Date dhiValidTo) {
		this.dhiValidTo = dhiValidTo;
	}

	public Department getDhiDeptNo() {
		return dhiDeptNo;
	}

	public void setDhiDeptNo(Department dhiDeptNo) {
		this.dhiDeptNo = dhiDeptNo;
	}

	public Department getDhiDeptSupId() {
		return dhiDeptSupId;
	}

	public void setDhiDeptSupId(Department dhiDeptSupId) {
		this.dhiDeptSupId = dhiDeptSupId;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof Depthist))
			return false;
		Depthist depthist = (Depthist) obj;
		if (null == getId() || null == depthist.getId())
			return false;
		else
			return getId().equals(depthist.getId());
	}

	public int hashCode() {
		if (0x80000000 == hashCode) {
			if (null == getId())
				return super.hashCode();
			String hashStr = (new StringBuilder()).append(getClass().getName())
					.append(":").append(getId().hashCode()).toString();
			hashCode = hashStr.hashCode();
		}
		return hashCode;
	}

	public String toString() {
		return super.toString();
	}

	public static String REF = "Depthist";
	public static String PROP_DHI_DEPT_NAME = "dhiDeptName";
	public static String PROP_DHI_DEPT_STATUS = "dhiDeptStatus";
	public static String PROP_DHI_DEPT_SUP_ID = "dhiDeptSupId";
	public static String PROP_DHI_DEPT_NO = "dhiDeptNo";
	public static String PROP_DHI_VALID_TO = "dhiValidTo";
	public static String PROP_ID = "id";
	public static String PROP_DHI_VALID_FROM = "dhiValidFrom";
	private int hashCode;
	private String id;
	private String dhiDeptName;
	private Integer dhiDeptStatus;
	private Date dhiValidFrom;
	private Date dhiValidTo;
	private Department dhiDeptNo;
	private Department dhiDeptSupId;

}
